home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Canadian & World Encyclopedia 1998
/
The Canadian & World Encyclopedia 1998 - Disc 2.iso
/
mac
/
prime_CD
/
pb
/
basecast.cst
/
00005_Script_init global script
< prev
next >
Wrap
Text File
|
1997-07-24
|
5KB
|
195 lines
global pmroll_list, the_leaf, the_erarolls, current_pm, demo
on depth_check
if the colordepth <> 8 then
alert "this application performs best when your computer is set to display 256 colours."
-- quit
end if
end
on palfix_init
global fixpal
openxlib "FixPalet"
set fixpal=FixPalette(mNew, the stageLeft, the stageTop, the stageRight, the stageTop)
end
on patchpal
global fixpal
if objectp(fixpal) then fixpal(mPatchIt)
end patchpal
on palfix_stop
global fixpal
if objectp(fixpal) then
fixpal(mDispose)
end if
closeXlib "FixPalet"
end stopmovie
on archive_check
global media_displayed
if the movie contains "archive" then
hide_media(media_displayed)
puppets_off
end if
unload
end
on dopmtop
unload
if the movie = "profile.dir" then
if the colordepth > 8 then puppettransition 51,02,08
pm_prep(0)
-- go to "pmtop"
else
archive_check
-- if the colordepth > 8 then puppettransition 51,02,08
-- sound stop 1
-- go to "fadeout"
-- set the castnum of sprite 1 to cast "load_pro"
-- updatestage
-- sound playfile 1, "00prf.aif"
pm_prep(0)
-- go to movie fullpathfor("profile.dir") -- kf prs 11/20/96
-- if current_pm = 0 then
-- else
-- pm_prep(current_pm)
-- end if
end if
end
on doarchive
if the movie <> "archive.dir" then
if the colordepth > 8 then puppettransition 51,02,08
if the movie contains "_" then
go to marker("fadeout") + 1
else
go to "fadeout"
end if
set the castnum of sprite 1 to cast "load_arch"
updatestage
-- if the colordepth > 8 then puppettransition 51,02,08
go to movie fullpathfor("archive.dir") -- kf prs 11/20/96
end if
end
on startmovie_xxxxxx
if the moviename = "menu.dir" then
-- depth_check
set the searchpath = []
put the moviepath into mp
set s = mp&"snd"
set m = mp&"moovs"
set gr = mp&"gfx"
-- eras path
set er = mp&"Eras"
-- archive path
set ap = mp & "ARCHIVE"
if the machinetype < 256 then set sep = ":"
if the machinetype = 256 then set sep = "\"
set sap = ap & sep & "SOUND"
set vap = ap & sep & "VIDEO"
set pap = ap & sep & "PICT"
set oap = ap & sep & "OTHER"
set xap = ap & sep & "XOBJ"
set the searchPath = [ mp,s,m,gr,er]
put the searchpath into field "path"
-- if the machinetype < 256 then dobackdrop
makemenurolls
end if
end
on makemenurolls
set pmroll_list = []
set pmroll_list = [rect(115, 98, 160, 142), rect(163, 98, 208, 142), rect(211, 98, 256, 142), rect(259, 98, 304, 142), rect(307, 98, 351, 142), rect(115, 145, 160, 190), rect(163, 145, 208, 190), rect(211, 145, 256, 190), rect(259, 145, 304, 191), rect(307, 145, 351, 190), rect(115, 193, 160, 239), rect(163, 193, 208, 239), rect(211, 193, 256, 239), rect(259, 193, 304, 239), rect(307, 193, 351, 239), rect(115, 242, 160, 286), rect(163, 242, 208, 286), rect(211, 242, 256, 286), rect(259, 242, 304, 286), rect(307, 242, 351, 286)]
set the_leaf = []
set the_leaf = [rect(1, 39, 113, 68), rect(1, 67, 113, 96), rect(1, 95, 113, 124), rect(1, 123, 113, 152), rect(4, 154, 110, 177), rect(4, 182, 110, 205), rect(1, 207, 113, 236), rect(4, 238, 110, 261)]
set the_erarolls = []
set the_erarolls = [rect(113, 95 + 27, 191, 180 + 27), rect(176, 95 + 27, 269, 180 + 27), rect(252, 95 + 27, 341, 180 + 27), rect(321, 95 + 27, 411, 180 + 27), rect(397, 95 + 27, 475, 180 + 27), rect(456, 95 + 27, 530, 180 + 27), rect(515, 95 + 27, 577, 180 + 27)]
end
on xdobackdrop
global bg --global variable for our Backdrop instance
global printer
--only instantiate the backdrop once!
--creating multiple instances of
--the backdrop XObject is dangerous!
if objectp(bg)=0 then
--I like to keep xobjects in separate 'XOBJ' files
--in the same folder as the movie
--and open the xobject files only when I
--need to instantiate the XObject
openxlib "backdrop xobj"
put backdrop(mNew) into bg
--Then I close the file as soon as I'm done
--to avoid having lots of open files connected
--to a movie.
closexlib "backdrop xobj"
end if
if objectp(bg) then
--set whether the backdrop hides
--when we switch to another application
--(this should be set to match the movie preference
--"animate in background")
bg (mHideInBack,false)
--set the color of the backdrop
if the colordepth = 8 then bg(mSetColor,255)
else bg(mSetColor, 0)
--show the backdrop while the movie plays
bg(mShow)
end if
end
on closebackdrop
global bg, printer
--hide the backdrop when the movie's not playing
--(you don't have to do this if you like to keep the backdrop
--there while you work on a movie)
if objectp(bg) then bg(mHide)
end
on addtohistory tf
global nav_history
if not listP(nav_history) then set nav_history = []
append nav_history,tf
end